package com.tnovoselec.android.mojevijesti.dto;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

public class ChannelsResultHolder {
	static List<ChannelDto> RESULT = new ArrayList<ChannelDto>();

	private ChannelsResultHolder() {
		super();
	}

	public static void init(List<ChannelDto> items) {
		RESULT = items;
	}

	public static void clear() {
		ChannelsResultHolder.RESULT.clear();
	}

	public static List<ChannelDto> getAll() {
		return RESULT;
	}

	public ChannelDto getChannelByName(String name){
		for (ChannelDto ch : RESULT){
			if (ch.getChannelName().equals(name)){
				return ch;
			}
		}
		return null;
	}

}
